package ch.ti.kmltomap;

import java.io.InputStreamReader;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapFragment;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		try{
			InputStreamReader isr = new InputStreamReader(this.getAssets().open("your.kml"));
			Kml kml = new Kml(isr);
			GoogleMap map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
			kml.draw(map);
			Log.d("fatto", "fatto");
		}catch (Exception e) {
			Log.e("eeee", e.getMessage());
		}
    }


    
}
